<template>
	<view>
		<!-- 常用工具 -->
		<view class="interact-tools" style="margin-bottom: 15px">
			<div class="paddingBox">
				<view class="interact-container">
					<view class="interact-item" @click="navigateTo('/pages/mine/infor/index')">
						<image src="/static/mine/mynav1.png" mode=""></image>
						<view>我的资料</view>
					</view>
					<view class="interact-item" 
					   v-if='check == "审核通过" && info.status.statusName == "已缴费"'
						@click="navigateTo('/pages/mine/code?id='+info.info.id)">
						<image src="/static/mine/mynav2.png" mode=""></image>
						<view>二维码</view>
					</view>
					<view
						v-if='check == "审核通过" && info.status.statusName == "已缴费"'
						class="interact-item"
						@click="navigateTo('/pages/mine/ticket/index')"
					>
						<image src="/static/mine/mynav3.png" mode=""></image>
						<view>我的发票</view>
					</view>
					<view class="interact-item" @click="navigateTo('/pages/mine/kefu')">
						<image src="/static/mine/mynav4.png" mode=""></image>
						<view>在线客服</view>
					</view>
					<!-- <view class="interact-item" @click="statusFun">
						<image src="/static/mine/mynav5.png" mode=""></image>
						<view>状态更新</view>
					</view> -->
				</view>
			</div>
		</view>
	</view>
</template>

<script>
import configs from "@/config/config";
import storage from "@/utils/storage.js";
import { info } from "@/api/login";
export default {
	props: {
		user: {
			type: Object,
			default: {}
		},
		info: {
			type: Object,
			default: {}
		}
	},
	data() {
		return {
			configs,
			storage,
			show: false,
			check:storage.getUserInfo().status.checkName
		};
	},

	mounted() {
	},

	methods: {
		//状态更新
		statusFun(){
			info().then((res) => {
				storage.setUserInfo(res);
				// 登录成功
				uni.showToast({
					title: "更新成功",
					icon: "none"
				});
				location.reload()
			});
		},
		navigateTo(url) {
			uni.navigateTo({
				url
			});
		},
		linkMsgDetail() {
			uni.navigateTo({
				url: `/pages/mine/im/list`
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.interact-tools {
	border-left: none;
	border-right: none;

	.interactBox {
		height: 156rpx;
	}
	.interact-container {
		margin: 0 20rpx;
		background: #fff;
		border-radius: 20rpx;
		box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
		.interact-item-img {
			width: 52rpx !important;
			height: 52rpx !important;
			// margin-bottom:  !important;
			margin: 0 auto 6rpx auto !important;
		}
		image {
			width: 52rpx;
			height: 52rpx;
			margin-bottom: 6rpx;
		}
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		text-align: center;

		.interact-item {
			font-size: $font-sm;
			width: 25%;
			height: 160rpx;
			padding: 30rpx;
		}
	}
}
</style>
